# 获取国铁菜单
# 入参是ocr识别出来的json
ocrResult = [{
"Cells": [
{
"ColBr": 9,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 22,
"Y": 0
},
{
"X": 1176,
"Y": 0
},
{
"X": 1176,
"Y": 95
},
{
"X": 22,
"Y": 94
}
],
"RowBr": 1,
"RowTl": 0,
"Text": "2024.6.24-2024.6.30公司菜单\n主厨: 彭军",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 22,
"Y": 94
},
{
"X": 116,
"Y": 95
},
{
"X": 116,
"Y": 191
},
{
"X": 22,
"Y": 190
}
],
"RowBr": 3,
"RowTl": 1,
"Text": "日期",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 116,
"Y": 95
},
{
"X": 322,
"Y": 95
},
{
"X": 323,
"Y": 190
},
{
"X": 116,
"Y": 191
}
],
"RowBr": 3,
"RowTl": 1,
"Text": "早餐",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 322,
"Y": 95
},
{
"X": 1002,
"Y": 95
},
{
"X": 1002,
"Y": 148
},
{
"X": 323,
"Y": 147
}
],
"RowBr": 2,
"RowTl": 1,
"Text": "午餐",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1002,
"Y": 95
},
{
"X": 1176,
"Y": 95
},
{
"X": 1176,
"Y": 189
},
{
"X": 1002,
"Y": 189
}
],
"RowBr": 3,
"RowTl": 1,
"Text": "晚餐",
"Type": "body"
},
{
"ColBr": 3,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 323,
"Y": 147
},
{
"X": 432,
"Y": 147
},
{
"X": 432,
"Y": 191
},
{
"X": 323,
"Y": 190
}
],
"RowBr": 3,
"RowTl": 2,
"Text": "主菜",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 3,
"Confidence": 100,
"Polygon": [
{
"X": 432,
"Y": 147
},
{
"X": 544,
"Y": 147
},
{
"X": 544,
"Y": 190
},
{
"X": 432,
"Y": 191
}
],
"RowBr": 3,
"RowTl": 2,
"Text": "荤菜1",
"Type": "body"
},
{
"ColBr": 5,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 544,
"Y": 147
},
{
"X": 653,
"Y": 147
},
{
"X": 653,
"Y": 190
},
{
"X": 544,
"Y": 190
}
],
"RowBr": 3,
"RowTl": 2,
"Text": "荤菜2",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 5,
"Confidence": 100,
"Polygon": [
{
"X": 653,
"Y": 147
},
{
"X": 764,
"Y": 147
},
{
"X": 764,
"Y": 189
},
{
"X": 653,
"Y": 190
}
],
"RowBr": 3,
"RowTl": 2,
"Text": "素菜1",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 764,
"Y": 147
},
{
"X": 877,
"Y": 148
},
{
"X": 877,
"Y": 190
},
{
"X": 764,
"Y": 189
}
],
"RowBr": 3,
"RowTl": 2,
"Text": "素菜2",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 877,
"Y": 148
},
{
"X": 1002,
"Y": 148
},
{
"X": 1002,
"Y": 189
},
{
"X": 877,
"Y": 190
}
],
"RowBr": 3,
"RowTl": 2,
"Text": "汤",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 22,
"Y": 190
},
{
"X": 116,
"Y": 191
},
{
"X": 117,
"Y": 253
},
{
"X": 23,
"Y": 252
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "星期 一",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 116,
"Y": 191
},
{
"X": 323,
"Y": 190
},
{
"X": 324,
"Y": 253
},
{
"X": 117,
"Y": 253
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "玉米煎饼 酱肉包\n红糖馒头煮鸡蛋\n八宝粥 红油泡菜",
"Type": "body"
},
{
"ColBr": 3,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 323,
"Y": 190
},
{
"X": 432,
"Y": 191
},
{
"X": 434,
"Y": 253
},
{
"X": 324,
"Y": 253
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "粉蒸排骨",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 3,
"Confidence": 100,
"Polygon": [
{
"X": 432,
"Y": 191
},
{
"X": 544,
"Y": 190
},
{
"X": 545,
"Y": 252
},
{
"X": 434,
"Y": 253
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "洋葱肉片",
"Type": "body"
},
{
"ColBr": 5,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 544,
"Y": 190
},
{
"X": 653,
"Y": 190
},
{
"X": 656,
"Y": 253
},
{
"X": 545,
"Y": 252
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "泡椒猪肝",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 5,
"Confidence": 100,
"Polygon": [
{
"X": 653,
"Y": 190
},
{
"X": 764,
"Y": 189
},
{
"X": 766,
"Y": 252
},
{
"X": 656,
"Y": 253
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "开心凉粉",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 764,
"Y": 189
},
{
"X": 877,
"Y": 190
},
{
"X": 878,
"Y": 252
},
{
"X": 766,
"Y": 252
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "糖醋莲白",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 877,
"Y": 190
},
{
"X": 1002,
"Y": 189
},
{
"X": 1003,
"Y": 252
},
{
"X": 878,
"Y": 252
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "醪糟 汤圆",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1002,
"Y": 189
},
{
"X": 1176,
"Y": 189
},
{
"X": 1177,
"Y": 252
},
{
"X": 1003,
"Y": 252
}
],
"RowBr": 4,
"RowTl": 3,
"Text": "鸡 丝凉面+白米粥",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 23,
"Y": 252
},
{
"X": 117,
"Y": 253
},
{
"X": 117,
"Y": 315
},
{
"X": 23,
"Y": 314
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "星期二",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 117,
"Y": 253
},
{
"X": 324,
"Y": 253
},
{
"X": 324,
"Y": 314
},
{
"X": 117,
"Y": 315
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "香煎馅饼芽菜包\n馒头卤鸡蛋\n玉米粥 清炒土豆丝",
"Type": "body"
},
{
"ColBr": 3,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 324,
"Y": 253
},
{
"X": 434,
"Y": 253
},
{
"X": 435,
"Y": 314
},
{
"X": 324,
"Y": 314
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "红油鸡块",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 3,
"Confidence": 100,
"Polygon": [
{
"X": 434,
"Y": 253
},
{
"X": 545,
"Y": 252
},
{
"X": 546,
"Y": 313
},
{
"X": 435,
"Y": 314
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "冬瓜烩丸子",
"Type": "body"
},
{
"ColBr": 5,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 545,
"Y": 252
},
{
"X": 656,
"Y": 253
},
{
"X": 657,
"Y": 314
},
{
"X": 546,
"Y": 313
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "蒜苔肉丝",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 5,
"Confidence": 100,
"Polygon": [
{
"X": 656,
"Y": 253
},
{
"X": 766,
"Y": 252
},
{
"X": 766,
"Y": 313
},
{
"X": 657,
"Y": 314
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "拌三丝",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 766,
"Y": 252
},
{
"X": 878,
"Y": 252
},
{
"X": 878,
"Y": 313
},
{
"X": 766,
"Y": 313
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "蒜泥生菜",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 878,
"Y": 252
},
{
"X": 1003,
"Y": 252
},
{
"X": 1003,
"Y": 312
},
{
"X": 878,
"Y": 313
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "西米 露",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1003,
"Y": 252
},
{
"X": 1177,
"Y": 252
},
{
"X": 1177,
"Y": 312
},
{
"X": 1003,
"Y": 312
}
],
"RowBr": 5,
"RowTl": 4,
"Text": "排骨面",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 23,
"Y": 314
},
{
"X": 117,
"Y": 315
},
{
"X": 116,
"Y": 387
},
{
"X": 23,
"Y": 387
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "星期三",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 117,
"Y": 315
},
{
"X": 324,
"Y": 314
},
{
"X": 325,
"Y": 386
},
{
"X": 116,
"Y": 387
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "椒盐花卷酱肉包\n馒头鸡蛋\n南瓜粥红油泡菜",
"Type": "body"
},
{
"ColBr": 3,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 324,
"Y": 314
},
{
"X": 435,
"Y": 314
},
{
"X": 436,
"Y": 386
},
{
"X": 325,
"Y": 386
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "仔 姜兔",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 3,
"Confidence": 100,
"Polygon": [
{
"X": 435,
"Y": 314
},
{
"X": 546,
"Y": 313
},
{
"X": 547,
"Y": 385
},
{
"X": 436,
"Y": 386
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "酱爆肉丁",
"Type": "body"
},
{
"ColBr": 5,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 546,
"Y": 313
},
{
"X": 657,
"Y": 314
},
{
"X": 659,
"Y": 385
},
{
"X": 547,
"Y": 385
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "韭菜炒蛋",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 5,
"Confidence": 100,
"Polygon": [
{
"X": 657,
"Y": 314
},
{
"X": 766,
"Y": 313
},
{
"X": 767,
"Y": 384
},
{
"X": 659,
"Y": 385
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "糖拌西红柿",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 766,
"Y": 313
},
{
"X": 878,
"Y": 313
},
{
"X": 878,
"Y": 384
},
{
"X": 767,
"Y": 384
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "炝炒苕尖",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 878,
"Y": 313
},
{
"X": 1003,
"Y": 312
},
{
"X": 1003,
"Y": 383
},
{
"X": 878,
"Y": 384
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "萝卜大骨汤",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1003,
"Y": 312
},
{
"X": 1177,
"Y": 312
},
{
"X": 1177,
"Y": 384
},
{
"X": 1003,
"Y": 383
}
],
"RowBr": 6,
"RowTl": 5,
"Text": "冒菜套餐",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 23,
"Y": 387
},
{
"X": 116,
"Y": 387
},
{
"X": 117,
"Y": 450
},
{
"X": 24,
"Y": 450
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "星期四",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 116,
"Y": 387
},
{
"X": 325,
"Y": 386
},
{
"X": 326,
"Y": 449
},
{
"X": 117,
"Y": 450
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "油饼 小葱豆腐包\n馒头卤鸡蛋\n红薯粥凉拌萝卜丝",
"Type": "body"
},
{
"ColBr": 3,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 325,
"Y": 386
},
{
"X": 436,
"Y": 386
},
{
"X": 438,
"Y": 449
},
{
"X": 326,
"Y": 449
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "咸烧白",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 3,
"Confidence": 100,
"Polygon": [
{
"X": 436,
"Y": 386
},
{
"X": 547,
"Y": 385
},
{
"X": 548,
"Y": 448
},
{
"X": 438,
"Y": 449
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "芹菜炒鸡杂",
"Type": "body"
},
{
"ColBr": 5,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 547,
"Y": 385
},
{
"X": 659,
"Y": 385
},
{
"X": 661,
"Y": 448
},
{
"X": 548,
"Y": 448
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "韭黄肉丝",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 5,
"Confidence": 100,
"Polygon": [
{
"X": 659,
"Y": 385
},
{
"X": 767,
"Y": 384
},
{
"X": 769,
"Y": 447
},
{
"X": 661,
"Y": 448
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "拍 黄瓜",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 767,
"Y": 384
},
{
"X": 878,
"Y": 384
},
{
"X": 879,
"Y": 447
},
{
"X": 769,
"Y": 447
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "清炒 空心菜",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 878,
"Y": 384
},
{
"X": 1003,
"Y": 383
},
{
"X": 1004,
"Y": 446
},
{
"X": 879,
"Y": 447
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "素三鲜汤",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1003,
"Y": 383
},
{
"X": 1177,
"Y": 384
},
{
"X": 1178,
"Y": 447
},
{
"X": 1004,
"Y": 446
}
],
"RowBr": 7,
"RowTl": 6,
"Text": "鱼香鸡排饭",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 24,
"Y": 450
},
{
"X": 117,
"Y": 450
},
{
"X": 117,
"Y": 512
},
{
"X": 24,
"Y": 512
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "星期五",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 117,
"Y": 450
},
{
"X": 326,
"Y": 449
},
{
"X": 326,
"Y": 511
},
{
"X": 117,
"Y": 512
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "南瓜饼蔬菜包\n玉米馒头鸡蛋\n小米粥红油泡菜",
"Type": "body"
},
{
"ColBr": 3,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 326,
"Y": 449
},
{
"X": 438,
"Y": 449
},
{
"X": 439,
"Y": 511
},
{
"X": 326,
"Y": 511
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "凉拌头肉",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 3,
"Confidence": 100,
"Polygon": [
{
"X": 438,
"Y": 449
},
{
"X": 548,
"Y": 448
},
{
"X": 549,
"Y": 510
},
{
"X": 439,
"Y": 511
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "丝瓜滑肉",
"Type": "body"
},
{
"ColBr": 5,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 548,
"Y": 448
},
{
"X": 661,
"Y": 448
},
{
"X": 662,
"Y": 510
},
{
"X": 549,
"Y": 510
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "肉沫豇豆",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 5,
"Confidence": 100,
"Polygon": [
{
"X": 661,
"Y": 448
},
{
"X": 769,
"Y": 447
},
{
"X": 769,
"Y": 509
},
{
"X": 662,
"Y": 510
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "干煸苦瓜 ",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 769,
"Y": 447
},
{
"X": 879,
"Y": 447
},
{
"X": 879,
"Y": 509
},
{
"X": 769,
"Y": 509
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "蒜泥大白菜",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 879,
"Y": 447
},
{
"X": 1004,
"Y": 446
},
{
"X": 1004,
"Y": 508
},
{
"X": 879,
"Y": 509
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "绿豆汤",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1004,
"Y": 446
},
{
"X": 1178,
"Y": 447
},
{
"X": 1178,
"Y": 508
},
{
"X": 1004,
"Y": 508
}
],
"RowBr": 8,
"RowTl": 7,
"Text": "肉丝炒河粉",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 24,
"Y": 512
},
{
"X": 117,
"Y": 512
},
{
"X": 117,
"Y": 562
},
{
"X": 24,
"Y": 562
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "星期六",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 117,
"Y": 512
},
{
"X": 326,
"Y": 511
},
{
"X": 326,
"Y": 561
},
{
"X": 117,
"Y": 562
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "酱肉包馒头鸡蛋\n花生粥红油泡菜",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 326,
"Y": 511
},
{
"X": 549,
"Y": 510
},
{
"X": 549,
"Y": 560
},
{
"X": 326,
"Y": 561
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "回锅肉",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 549,
"Y": 510
},
{
"X": 769,
"Y": 509
},
{
"X": 770,
"Y": 559
},
{
"X": 549,
"Y": 560
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "三月瓜炒肉丝",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 769,
"Y": 509
},
{
"X": 879,
"Y": 509
},
{
"X": 879,
"Y": 559
},
{
"X": 770,
"Y": 559
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "清炒油麦菜",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 879,
"Y": 509
},
{
"X": 1004,
"Y": 508
},
{
"X": 1004,
"Y": 558
},
{
"X": 879,
"Y": 559
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "白 菜豆腐汤",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1004,
"Y": 508
},
{
"X": 1178,
"Y": 508
},
{
"X": 1178,
"Y": 559
},
{
"X": 1004,
"Y": 558
}
],
"RowBr": 9,
"RowTl": 8,
"Text": "酸菜米线",
"Type": "body"
},
{
"ColBr": 1,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 24,
"Y": 562
},
{
"X": 117,
"Y": 562
},
{
"X": 117,
"Y": 610
},
{
"X": 24,
"Y": 610
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "星期日",
"Type": "body"
},
{
"ColBr": 2,
"ColTl": 1,
"Confidence": 100,
"Polygon": [
{
"X": 117,
"Y": 562
},
{
"X": 326,
"Y": 561
},
{
"X": 326,
"Y": 609
},
{
"X": 117,
"Y": 610
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "酱肉包馒头鸡蛋\n绿豆粥 凉拌豆芽",
"Type": "body"
},
{
"ColBr": 4,
"ColTl": 2,
"Confidence": 100,
"Polygon": [
{
"X": 326,
"Y": 561
},
{
"X": 549,
"Y": 560
},
{
"X": 549,
"Y": 608
},
{
"X": 326,
"Y": 609
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "豆花肉片",
"Type": "body"
},
{
"ColBr": 6,
"ColTl": 4,
"Confidence": 100,
"Polygon": [
{
"X": 549,
"Y": 560
},
{
"X": 770,
"Y": 559
},
{
"X": 770,
"Y": 608
},
{
"X": 549,
"Y": 608
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "青椒肉丝",
"Type": "body"
},
{
"ColBr": 7,
"ColTl": 6,
"Confidence": 100,
"Polygon": [
{
"X": 770,
"Y": 559
},
{
"X": 879,
"Y": 559
},
{
"X": 879,
"Y": 608
},
{
"X": 770,
"Y": 608
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "炝炒瓢儿白",
"Type": "body"
},
{
"ColBr": 8,
"ColTl": 7,
"Confidence": 100,
"Polygon": [
{
"X": 879,
"Y": 559
},
{
"X": 1004,
"Y": 558
},
{
"X": 1004,
"Y": 607
},
{
"X": 879,
"Y": 608
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "番茄蛋花汤",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 8,
"Confidence": 100,
"Polygon": [
{
"X": 1004,
"Y": 558
},
{
"X": 1178,
"Y": 559
},
{
"X": 1178,
"Y": 607
},
{
"X": 1004,
"Y": 607
}
],
"RowBr": 10,
"RowTl": 9,
"Text": "红油 水饺",
"Type": "body"
},
{
"ColBr": 9,
"ColTl": 0,
"Confidence": 100,
"Polygon": [
{
"X": 24,
"Y": 610
},
{
"X": 1178,
"Y": 607
},
{
"X": 1178,
"Y": 646
},
{
"X": 24,
"Y": 646
}
],
"RowBr": 11,
"RowTl": 10,
"Text": "制表: 郑东",
"Type": "body"
}
],
"TableCoordPoint": [
{},
{},
{
"X": 1178,
"Y": 646
},
{
"X": 22,
"Y": 646
}
],
"Type": 1
}]

# index 4,周一   10，周天
# 暂时默认菜单包含七天
# 返回值是这一天的早中晚餐，看后续需要再二次处理
def getGuotieMenu(ocrResult,index):
    # 定义一个字典来按行分组
    rows = {}
    # 遍历所有单元格，按RowBr（或RowTl）分组
    for cell in ocrResult[0]['Cells']:
    # for cell in ocrResult['Cells']:
        row_id = cell['RowBr']  # 如果您想按RowTl分组，就使用cell['RowTl']
        if row_id not in rows:
            rows[row_id] = []
        rows[row_id].append(cell)
    # 现在rows字典包含了按行分组的数据
    # 假设我们想获取RowBr为2的所有单元格
    row_2_cells = rows[index]
    return row_2_cells


# getGuotieMenu(ocrResult,5)

# 接收getGuotieMenu返回，返回一个列表
# ['星期二', '香煎馅饼芽菜包\n馒头卤鸡蛋\n玉米粥 清炒土豆丝', '红油鸡块', '冬瓜烩丸子', '蒜苔肉丝', '拌三丝', '蒜泥生菜', '西米 露', '排骨面']
def showEverydayMenu(cells):
    EverydayMenu=[]
    for cell in cells:
        # print(cell['Text'])  # 打印这一行的所有文本
        EverydayMenu.append(cell['Text'].replace(' ',''))
    return(EverydayMenu)

# print(type(showEverydayMenu(getGuotieMenu(ocrResult,6))))
# # print(list(showEverydayMenu(getGuotieMenu(ocrResult,5))))
# listM = showEverydayMenu(getGuotieMenu(ocrResult,6))
# print(listM)

